{include file="public/base"}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>管理员列表</h5>
                    <div class="ibox-tools">
                        <a class="collapse-link">
                            <i class="fa fa-chevron-up"></i>
                        </a>

                        <a class="close-link">
                            <i class="fa fa-times"></i>
                        </a>
                    </div>
                </div>
                <div class="ibox-content">
                    <a  href="javascript:;" onclick="change()" class="btn btn-info "><i class="fa fa-paste"></i> <span class="bold">添加管理员</span></a>
                    <table class="table table-striped table-bordered table-hover dataTables-example">
                        <thead>
                        <tr>
                            <th  style="text-align: center;">序号</th>
                            <th style="text-align: center">管理员</th>
                            <th style="text-align: center">身份</th>
                            <th style="text-align: center">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        {volist name="res" id="v" key='k'}
                        <tr class="gradeX" >
                            <td>{$k}</td>
                            <td>{$v.account}</td>
                            <td>{$v.isadmin?"超级管理员":"普通管理员"}</td>
                            <td>
                                <a  href="javascript:;" onclick="updategroup({$v.id})" class="btn btn-info " ><i class="fa fa-paste"></i> <span class="bold">修改权限</span></a>
                                <a  href="javascript:;" onclick="updatexx({$v.id})" class="btn btn-info " ><i class="fa fa-paste"></i> <span class="bold">修改信息</span></a>
                                <a  href="{:url('admin/admin/del',array('id'=>$v.id,'status'=>1))}" class="btn btn-danger " onclick="return confirm('您确定删除吗？')"><i class="fa fa-paste"></i> <span class="bold">删除</span></a>
                            </td>
                        </tr>
                        {/volist}
                        </tbody>
                    </table>
                    <div>{$page}</div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="ADMIN_JS/js/jquery.min.js?v=2.1.4"></script>
<script src="ADMIN_JS/js/bootstrap.min.js?v=3.3.5"></script>
<script src="ADMIN_JS/js/plugins/jeditable/jquery.jeditable.js"></script>
<script src="ADMIN_JS/js/plugins/dataTables/jquery.dataTables.js"></script>
<script src="ADMIN_JS/js/plugins/dataTables/dataTables.bootstrap.js"></script>
<script src="ADMIN_JS/js/content.min.js?v=1.0.0"></script>
<script>
    $(document).ready(function(){$(".dataTables-example").dataTable();var oTable=$("#editable").dataTable();oTable.$("td").editable("../example_ajax.php",{"callback":function(sValue,y){var aPos=oTable.fnGetPosition(this);oTable.fnUpdate(sValue,aPos[0],aPos[1])},"submitdata":function(value,settings){return{"row_id":this.parentNode.getAttribute("id"),"column":oTable.fnGetPosition(this)[2]}},"width":"90%","height":"100%"})});function fnClickAddRow(){$("#editable").dataTable().fnAddData(["Custom row","New row","New row","New row","New row"])};
</script>
<script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>
<script>
    //$(document).ready(function(){$(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})});
    function updategroup(id)
    {
        var url = '{:url("admin/updategroup",["id"=>"postId"])}';
        url = url.replace('postId',id);
        //自定页
        layer.open({
            type: 2,
            skin: 'layui-layer-demo', //样式类名
            area: ['60%', '80%'], //宽高
            shadeClose: true, //开启遮罩关闭
            content: url
        });
    }
    function updatexx(id)
    {
        var url = '{:url("admin/updatexx",["id"=>"postId"])}';
        url = url.replace('postId',id);
        //自定页
        layer.open({
            type: 2,
            skin: 'layui-layer-demo', //样式类名
            area: ['60%', '80%'], //宽高
            shadeClose: true, //开启遮罩关闭
            content: url
        });
    }
    function change()
    {
        var url = '{:url("admin/change")}';
        //自定页
        layer.open({
            type: 2,
            skin: 'layui-layer-demo', //样式类名
            area: ['60%', '80%'], //宽高
            shadeClose: true, //开启遮罩关闭
            content: url
        });
    }
</script>
</body>
